Update xen-clone script for hg. Still missing revision selection functionality.
authoriap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk>
Fri, 1 Jul 2005 02:12:36 +0000 (02:12 +0000)
committeriap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk>
Fri, 1 Jul 2005 02:12:36 +0000 (02:12 +0000)
Signed-off-by: ian@xensource.com
tools/misc/xen-clone

index f509da73bf799029b8c2299348d99fe58bf85f00..fe573ef9df7b04a5ce053b438720c483937479c5 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh -x
 
-# usage: xen-clone bk_repository dest_dir orig_linux_dir
+# usage: xen-clone hg_repository dest_dir orig_linux_dir
 # 
 # this script contains some CL site specific details, but can easily be adapted
 #
 
 case "$SITE" in
 UCCL)
-       BK_REP=${1:-/usr/groups/xeno/BK/xeno.bk}
-       # BK_REP=${1:-xeno-master/xeno.bk}
+       BK_REP=${1:-http://hg.srg.cl.cam.ac.uk/xen-unstable.hg}
        LINUX_DIR=${3:-/usr/groups/xeno/archive/}
        ;;
 *)
-       BK_REP=${1:-bk://xen.bkbits.net/xeno-1.0.bk}
-       # BK_REP=${1:-ssh://xen@xen.bkbits.net/xeno-1.0.bk}
+       BK_REP=${1:-http://xenbits.xensource.com/xen-unstable.hg}
        LINUX_DIR=${3:-.:..}
 ;;
 esac
 
 DEST_DIR=${2:-xeno-clone}
 DEST_BK_REP=`basename "${BK_REP}"`
-DEST_VER=`basename ${DEST_BK_REP} .bk`
+DEST_VER=`basename ${DEST_BK_REP} .hg`
 
-echo usage: xen-clone bk_repository dest_dir orig_linux_dir
+echo usage: xen-clone hg dest_dir orig_linux_dir
 echo Source BK Repository : ${BK_REP}
 echo Destination Dir/Repository : ${DEST_DIR}/${DEST_BK_REP}
 echo Pristine Linux Source directory : ${LINUX_DIR}
@@ -54,10 +52,10 @@ esac
 # clone the master repository (now checked-out by default)
 if [ ! -d ${DEST_BK_REP} ] 
 then 
-bk clone ${BK_REP} ${DEST_BK_REP}
+mkdir -p ${DEST_BK_REP} ; cd ${DEST_BK_REP} ; hg init ${BK_REP} ${DEST_BK_REP} ; hg co ; cd ${TOP}
 else
 cd ${DEST_BK_REP}
-bk pull
+hg pull ; hg co
 cd ${TOP}
 fi
 
@@ -79,8 +77,8 @@ then
   ln -sf ../install install
  fi
 
- make -j4 world
- make -j4 linux24
+ make -j4 KERNELS=linux-* world
#make -j4 linux24
  cd ../install/boot
  if [ -r vmlinuz-2.6-xen0 ]
  then